home *** CD-ROM | disk | FTP | other *** search
- #ifndef __VOLUME_H__
- #define __VOLUME_H__
- /*
- * $RCSfile: volume.h,v $
- * $Revision: 1.1.1.1 $
- * $Date: 1996/05/04 21:55:20 $
- */
- /**********************************************************************
- * EXODUS Database Toolkit Software
- * Copyright (c) 1991 Computer Sciences Department, University of
- * Wisconsin -- Madison
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * THE COMPUTER SCIENCES DEPARTMENT OF THE UNIVERSITY OF WISCONSIN --
- * MADISON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION.
- * THE DEPARTMENT DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
- * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * The EXODUS Project Group requests users of this software to return
- * any improvements or extensions that they make to:
- *
- * EXODUS Project Group
- * c/o David J. DeWitt and Michael J. Carey
- * Computer Sciences Department
- * University of Wisconsin -- Madison
- * Madison, WI 53706
- *
- * or exodus@cs.wisc.edu
- *
- * In addition, the EXODUS Project Group requests that users grant the
- * Computer Sciences Department rights to redistribute these changes.
- **********************************************************************/
-
- #include "io.h" /* from top-level include dir. */
- #include "forward.h"
- #include "VOLIDCLASS.h"
-
- /*
- * The definition of the VolDev table.
- * The following type structure definition is used both for the table
- * of mounted volumes (VolDev) and the first page of the volume.
- */
- class VOLREC {
- public:
- _VOLUMENAME_ volName; /* physical name */
- VOLID volid; /* Volume ID */
- SERVERINFO *serverInfo; /* server for this volume */
- UONE flags; /* VOL_MOUNTED, etc, below */
- UONE properties; /* VOL_TEMP, etc. in io.h */
- LISTELEMENT hashList;
-
- inline BOOL equalFunc(VOLREC *other) const {
- return other->volid == this->volid;
- };
- inline int hashFunc() const { return (int)(this->volid); };
- void Dump(FILE *f);
- VOLIDCLASS *keylocation (int unique, VOLIDCLASS **unused);
- LISTELEMENT *listlocation (int unique);
- void ReInit();
- void Init();
- }; /* VOLREC */
-
- #define VOL_FREE 0x0 /* volume has not been used */
- #define VOL_TEMP VOLPROP_TEMP
- #define VOL_LOG VOLPROP_LOG
- #define VOL_MOUNTED 0x1 /* Have sent a mount request for this vol
- * since connecting to the server.
- * We can get a cx established to the
- * server under the aegis of another volume.
- * so we might find that we're connected
- * to this volume's server but never
- * mounted this volume.
- * This flags is unset when
- * we discover that the server has
- * disconnected us, or we explicitly
- * dismount the volume.
- */
- #define VOL_CLIENT_MOUNTED 0x2 /* Perhaps isn't VOL_MOUNTED now,
- * (server might have disconnected us)
- * but was used in some transaction since
- * we started running. This flag is set
- * on the first mount, and never unset.
- */
-
- /* BEGIN visible to user */
- /* Flags passed as argument to administrative funcs, such
- * as sm_GetRusage(), to indicate which servers to address
- */
- #define VOL_ALL 0
- #define VOL_USED_SINCE_INIT 1
- #define VOL_USED_IN_TRANSACTION 2
- #define VOL_BY_VOLID 3
-
- /* END visible to user */
- /* TODO: change all references to VOL_USED_SINCE_INIT */
- #define VOL_MOUNTED_SINCE_INIT VOL_USED_SINCE_INIT
-
-
- #ifdef JUNK
- /*
- * used only in the message STAT_VOLUME, which is not
- * in use these days.
- */
- typedef struct {
-
- _VOLUMENAME_ volName;
- VOLID volid; /* Volume ID */
- FOUR numPages;
- FOUR numCylinders;
- FOUR tracksPerCylinder;
- FOUR pagesPerTrack;
- FOUR bitmapPages;
- FOUR numFreePages;
- FLAGS properties;
-
- } VOLSTAT;
- #endif JUNK
-
- #endif __VOLUME_H__
-